/**********************************************************************
Copyright by FFCS, 2006-09-26
File Name: caller.cxx
Create Date: 2006-09-26
Author: CallerGen
Version:
Description: 
Last Version Date:
Version Date:
Modifications Since Last Version:
**********************************************************************/
#include <string>

using namespace std;

#include "base_type.h"
#include "message_define.h"
#include "caller.h"
#include "target.h"

int CallerForPpmTask::callByMessage(
                                    long l_message,
                                    BaseType& cl_1,
                                    string& str_2,
                                    string& str_3
                                    )
{
  PpmTaskFlowProcessor cl_target;
  int n_ret = 1;
  
  switch(l_message)
  {
  case MSG_PPM_TASK_00:
    n_ret=cl_target.createTask(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_01:
    n_ret=cl_target.startCheck(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_02:
    n_ret=cl_target.reportToGroup(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_03:
    n_ret=cl_target.modifyRequirements(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_04:
    n_ret=cl_target.startITSystemConfiguration(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_05:
    n_ret=cl_target.completeConfiguration(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_06:
    n_ret=cl_target.startITSystemTest(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_07:
    n_ret=cl_target.restartConfiguration(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_08:
    n_ret=cl_target.productRelease(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_09:
    n_ret=cl_target.startBusinessTest(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_10:
    n_ret=cl_target.checkComplete(
      cl_1,
      str_2,
      str_3
      );
    break;

    case MSG_PPM_TASK_11:
    n_ret=cl_target.finishCheck(
      cl_1,
      str_2,
      str_3
      );
    break;
    
    case MSG_PPM_TASK_12:
      n_ret=cl_target.groupReturnProblem(
        cl_1,
        str_2,
        str_3
        );
      break;
      
    case MSG_PPM_TASK_13:
      n_ret=cl_target.groupCompleteCheck(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_14:
      n_ret=cl_target.itTestComplete(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_15:
      n_ret=cl_target.testFail(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_16:
      n_ret=cl_target.businessTestFail(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_17:
      n_ret=cl_target.businessTestComplete(
        cl_1,
        str_2,
        str_3
        );
      break;
      
    case MSG_PPM_TASK_18:
      n_ret=cl_target.restartBusinessTestConfiguartion(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_19:
      n_ret=cl_target.releaseComplete(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_20:
      n_ret=cl_target.releaseInfoModify(
        cl_1,
        str_2,
        str_3
        );
      break;

    case MSG_PPM_TASK_21:
      n_ret=cl_target.taskCancel(
        cl_1,
        str_2,
        str_3
        );
      break;

	case MSG_PPM_TASK_22:
	  n_ret=cl_target.checkConfiguartion(
		cl_1,
		str_2,
		str_3
		);
    break;

	case MSG_PPM_TASK_23:
	  n_ret=cl_target.finishCheckConfiguartion(
		cl_1,
		str_2,
		str_3
		);
	  break;
	  
	case MSG_PPM_TASK_30:
	  n_ret=cl_target.startMarketPlanningCheck(
		cl_1,
		str_2,
		str_3
		);
	  break;

	case MSG_PPM_TASK_31:
	  n_ret=cl_target.departmentManagerCheck(
		cl_1,
		str_2,
		str_3
		);
	  break;

	case MSG_PPM_TASK_32:
	  n_ret=cl_target.MarketPlanningCheckFinished(
		cl_1,
		str_2,
		str_3
		);
	  break;
	  
	case MSG_PPM_TASK_33:
	  n_ret=cl_target.managerCheckFinished(
		cl_1,
		str_2,
		str_3
		);
	  break;
	  
	case MSG_PPM_TASK_34:
	  n_ret=cl_target.startOtherRuleCheck(
		cl_1,
		str_2,
		str_3
		);
	  break;

	case MSG_PPM_TASK_35:
	  n_ret=cl_target.OtherRuleCheckFinished(
		cl_1,
		str_2,
		str_3
		);
	  break;
	case MSG_PPM_TASK_36:
	  n_ret=cl_target.flowBack(
		cl_1,
		str_2,
		str_3
		);
	  break;
	case MSG_PPM_TASK_37:
	  n_ret=cl_target.flowExcute(
		cl_1,
		str_2,
		str_3
		);
	  break;
	case MSG_PPM_TASK_38:
		  n_ret=cl_target.createTaskConfirmation(
			cl_1,
			str_2,
			str_3
			);
	  break;
	case MSG_PPM_TASK_39:
		  n_ret=cl_target.departmentAutoCheck(
				cl_1,
				str_2,
				str_3
				);
	  break;
  }
  return n_ret;
}
